class Solution:
    def countVowelSubstrings(self, word: str) -> int:
        size = len(word)
        ans = 0
        for i in range(size):
            find = 0
            for j in range(i, size):
                ch = word[j]
                if ch == "a":
                    find |= 1
                elif ch == "e":
                    find |= 2
                elif ch == "i":
                    find |= 4
                elif ch == "o":
                    find |= 8
                elif ch == "u":
                    find |= 16
                else:
                    break
                if find == 31:
                    ans += 1
        return ans


if __name__ == "__main__":
    print(Solution().countVowelSubstrings(word="aeiouu"))  # 2
    print(Solution().countVowelSubstrings(word="unicornarihan"))  # 0
    print(Solution().countVowelSubstrings(word="cuaieuouac"))  # 7
    print(Solution().countVowelSubstrings(word="bbaeixoubb"))  # 0
